#pragma warning(disable:4996)
#include<stdio.h>
#include<stdlib.h>
//柔性数组
struct Score
{
	char name[20];
	int i;
//	int arr[0];
	double* score;
};
int main()
{
//	printf("%d\n", sizeof(struct Score));
	struct Score sco = { "张三",5, NULL };
	sco.score = (double*)malloc((sco.i)*sizeof(double));
	if (!sco.score){
		perror("malloc");
		return 1;
	}
	for (int i = 0; i < 5; i++){
		sco.score[i] = i*1.0;
	}
	for (int i = 0; i < 5; i++){
		printf("%lf\n",	sco.score[i]);
	}
	//数据处理
	free(sco.score);
	sco.score = NULL;
	return 0;
}